<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    let arr = [1,'张三',3.423,,,,,false];
    //数组长度arr.length
    for(let i = 0;i<arr.length;i++){
        console.log(arr[i]);
    }
    console.log('------------');
    arr[4]='数学';
    arr[5]='语文';
    for(let i = 0;i<arr.length;i++){
        console.log(arr[i]);
    }
    console.log(arr.length);  //8
    arr[1000]=1232;
    console.log(arr.length);    //1001
    console.log('------------');
    //in 运算符
    console.log(99 in arr);   //arr[99]:undefined
    console.log(1 in arr);     //arr[1]:'张三'
    console.log(1200 in arr);   //arr[1200]:下标超过数组长度 
    
</script>
</html>